package com.shxt.framework.commons.controller;

import java.util.HashMap;
import java.util.Map;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
@ControllerAdvice
public class ExceptionController {
	@ExceptionHandler(value=Exception.class)
	@ResponseBody
	public Map<String,Object> exception(Exception ex){
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("message",ex.getMessage());
		return map;
	}
}
